package tjut.control;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import tjut.bean.UsersEntity;
import tjut.service.IUserService;

@RestController("userControl")
public class UserInfoControl {
	@Autowired
	private IUserService userService;

	/**

	 * 插叙所有的用户信息

	 * 

	 * @return 用户信息集合

	 */
	public List<UsersEntity> selectAllUsersInfo() {
		// 调用dao层完成数据库查询操作


		List<UsersEntity> lstUsers = userService.selectAllUsersInfo();
		// 打印用户信息


		for (UsersEntity usersE : lstUsers) {
			System.out.println(usersE.toString());
		}
		return lstUsers;
	}
}
